[mirrors]
http://monkey.org/~dugsong/dsniff/beta/dsniff-2.4b1.tar.gz

[main]
filesize=131666
sha512=62dafab293de6dc3e9b01561b3627d63ca334467c01c3550a6318d8bcbe99d5a301ec16967af34065a14e8bca1c4b6a41da766cbd51ebd8338615b950c4f642f
tardir=dsniff-2.4

[deps]
dsniff-patches
libnet
libnids
portablexdr
db
openssl
libx11
libxmu

[build]
patch -p1 < "$K"/dsniff-xcompile.patch
patch -p1 < "$K"/dsniff-rpc.patch

tar xf "$C"/dsniff_2.4b1+debian-22.1.debian.tar.gz
while read i ; do
	patch -p1 < debian/patches/"$i"
done < debian/patches/series

[ -n "$CROSS_COMPILE" ] && \
  xconfflags="--host=$($CC -dumpmachine|sed 's/musl/gnu/') \
  --with-sysroot=$butch_root_dir"

CPPFLAGS="-D_GNU_SOURCE -DOPENSSL_ENABLE_OLD_DES_SUPPORT"
CFLAGS="$CPPFLAGS $optcflags" CXXFLAGS="$optcflags" \
LDFLAGS="$optldflags -Wl,-rpath-link=$butch_root_dir$butch_prefix/lib \
-lgthread-2.0 -lglib-2.0 -lportablexdr" \
  ./configure --prefix="$butch_prefix" --disable-nls $xconfflags \
  --mandir="$butch_prefix"/share/man \
  --sbindir="$butch_prefix"/bin \
  --with-libnet=$butch_root_dir$butch_prefix

make V=1 -j$MAKE_THREADS
make install_prefix="$butch_install_dir" install
